package demo.controller;

import demo.enity.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.stereotype.Controller;

/*@Controller*/
public class UserController {
    @Autowired
    private User user;
    public User printUser() {
        User user1 = this.user;
        System.out.println("com层user:" + user);
        user1.setName("王五");
        System.out.println("user1:" + user1);
        System.out.println("控制层user:" + user);
        return user1;
    }
}
